<template>
  <el-upload
      class="upload-demo"
      drag
      action=""
      multiple
      :auto-upload="false"

      :on-change="getFile"
  >
    <el-icon class="el-icon--upload"><upload-filled /></el-icon>
    <div class="el-upload__text">
      拖拽到此处或 <em>点击上传</em>
    </div>
  </el-upload>
  <el-row justify="end" >
    <el-col :span="3"><el-button @click="upload" type="primary">上传</el-button></el-col>
  </el-row>
</template>
<script setup>

import {UploadFilled} from "@element-plus/icons-vue";
import {ref} from "vue";

const getFile=( uploadFile, uploadFiles)=>{
  files.value.push(uploadFile.raw)
}
const emits = defineEmits(['batchImport']);
const  upload=()=>{
  emits("batchImport",files.value)
}
const files= ref([])
</script>
<style scoped>

</style>